package com.webchat.ugc.mongodb.document;


import com.fasterxml.jackson.annotation.JsonProperty;
import com.webchat.common.enums.mall.im.MallChatMessageTypeEnum;
import lombok.Data;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.MongoId;

import java.util.Date;
import java.util.Map;

@Data
@Document(collection = "mall_chat_message")
public class MallChatMessage {

    @MongoId
    private String id;

    @Indexed
    private String senderId;

    @Indexed
    private String receiverId;

    private String proxySenderId;

    private String proxyReceiverId;

    /**
     * 消息类型
     * @see com.webchat.common.enums.mall.im.MallImMessageTypeEnum
     */
    private Integer messageType;

    /**
     * 是否ai生成消息
     */
    private Boolean aiGenerate;

    /**
     * 消息读取状态 true:已读
     */
    private Boolean read;

    /**
     * 消息内容
     */
    private Object content;

    /**
     * 消息发送时间
     */
    @Indexed
    private Date sendDate;
}
